package com.cskaoyan.gateway.form.user;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author: thz
 * @class: RegisterForm
 */
@Data
public class RegisterForm {

    @Pattern(regexp = "^[a-zA-Z][A-Za-z0-9]{7,17}$", message = "用户名以字母开头，长度在8~18之间，只能包含字母、数字")
    private String userName;

    @Pattern(regexp = "^[a-zA-Z][A-Za-z0-9]{5,17}$",message = "密码以字母开头，长度在6~18之间，只能包含字母、数字")
    private String userPwd;

    private String captcha;

    @Email(message = "邮箱地址格式不正确")
    private String email;
}
